<form name="form">
  <div class="panel panel-default">
    <div class="panel-heading">
      <a href="" ui-sref="^.list" class="btn btn-xs btn-default"><i class="fa fa-arrow-left"></i></a>
      <span ng-show="!ctrl.event.id" translate>Add a new event</span>
      <span ng-show="ctrl.event.id" translate>Edit event</span>
    </div>
    <div class="panel-body">
      <div class="row">
        <div class="col-md-4">
          <formly-form model="ctrl.event" fields="ctrl.formFields" options="ctrl.formOptions"></formly-form>
        </div>
      </div>
    </div>
    <div class="panel-footer">
      <button type="submit" class="btn btn-primary btn-success" ng-click="ctrl.submit()" ng-disabled="form.$invalid">
        Submit
      </button>
      <button type="button" class="btn btn-default" ng-click="ctrl.formOptions.resetModel()">Reset</button>
    </div>
  </div>
</form>
